package com.zxh.blog.service.impl;

import com.zxh.blog.dao.NoticeDao;
import com.zxh.blog.domain.Notice;
import com.zxh.blog.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
	@Autowired
	NoticeDao noticeDao;

	public Integer addNotice(Notice notice) {
		Integer save = noticeDao.save(notice);
		return save;
	}

	public void updateNotice(Notice notice) {
		noticeDao.update(notice);
	}

	public void deleteByIds(int[] ids) {
	 	noticeDao.batchDelete(ids);
	}

	public List<Notice> selectByList() {
		List<Notice> list = noticeDao.selectByList();
		return list;
	}
}
